22nd chapter-Working with viewsThis chapter describes what the views are, how they work, and when to use them. We'll also see how to use the view to simplify some of the SQL operations performed in the previous section.22.1 viewsRequires MySQL 5
MySQL transactions and views, MySQL transaction views
Transactions
1. Concept
A set of one or more SQL statements!Transactions: a collection of operations. They are born together. Either the execution is successful or the execution
Mysql-views, stored procedures, triggers, and mysql-Views
I. VIEW
A view is a virtual table and does not store any data. Only the running time contains the dynamically retrieved data.
Eg: SELECT sid, name, sex, s_num FROM student, school WHERE sid =
MySQL 21-29 highlights: Views, triggers, stored procedures, cursors, transaction processing bitsCN.com
21. create and operate tables
21. 1. create a table
Create table:
1) Name of the new table, after the keyword CREATETABLE
2) names and definitions
Henan College of Traditional Chinese Medicine
Course Design Report of MySQL Database Management
Title: Research and Implementation of MySQL Clusters
Completion date:2012January 1, December 31
Contents
1. Course Design overview 3
2. research
21. create and operate tables
21. 1. Create a table
Create table:
1) Name of the new table, after the keyword CREATETABLE
2) names and definitions of table columns, separated by commas
Create table MERs
(
Cust_id int not null
Introduction to IndexesAn index is a decentralized storage structure created to speed up the retrieval of rows of data in a table. Indexes are built on tables and are made up of index pages other than data pages, and the rows in each index page
A Common loops in MySQL stored procedures1.while loop: While ..... Do ..... END whileExample 1:Create stored procedures (for 1+2+.......+num and):To create a success, make a call:Show Results:2.REPEAT loop: REPEAT ..... Untll END REPEATExample 2:To
Index
What's the view?
Why do I need a view
Rules for working with views
How to use views
View Application Instance
Don't update your data with views!
What's the view?The best way to understand a view is to look at
Mysql View1. Introduction to the View1) Meaning of the view:A view is a virtual table. Unlike a table that contains data, a view contains only queries that retrieve data dynamically when used.2) Why use Views:Reuse SQL statements.simplifies complex
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.